package com.lyf.boot.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serial;

/**
 * @author Luyufan
 * @date 2023/7/12 11:45
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RedisLockException extends RuntimeException{

    @Serial
    private static final long serialVersionUID = -7257982096160302298L;
    private Integer code;

    private String message;

    public RedisLockException(String message){
        this.message = message;
        this.code = 500;
    }
}
